package com.qd.common.panda.domain.entity.carpark;

import com.cdqidi.util.page.BaseQuery;
import com.cdqidi.valid.group.DefaultGroup;
import com.cdqidi.valid.group.DeleteGroup;
import com.cdqidi.valid.group.UpdateGroup;
import com.fasterxml.jackson.annotation.JsonProperty;
import lombok.EqualsAndHashCode;
import lombok.Getter;
import lombok.Setter;
import lombok.ToString;

import javax.validation.constraints.NotBlank;
import javax.validation.constraints.NotNull;
import javax.validation.constraints.Size;


/**
 * 油枪号信息
 *
 * @author sjk
 */
@EqualsAndHashCode(callSuper = true)
@Getter
@Setter
@ToString
public class CarParkGasStationNozzleDTO extends BaseQuery {

    /**
     * 主键
     */
    @NotBlank(message = "油枪号ID不能为空", groups = {DeleteGroup.class, UpdateGroup.class})
    @Size(max = 50, message = "油枪号ID长度不能超过{max}位", groups = {DeleteGroup.class, UpdateGroup.class})
    private String id;
    /**
     * 油号
     */
    @NotNull(message = "油号不能为空", groups = DefaultGroup.class)
    private Integer octaneNumber;
    /**
     * 枪号
     */
    @NotBlank(message = "枪号不能为空", groups = DefaultGroup.class)
    @Size(max = 20, message = "枪号长度不能超过{max}位", groups = DefaultGroup.class)
    private String nozzleNumber;
    /**
     * 停车场标识
     */
    @NotBlank(message = "停车场标识不能为空", groups = DefaultGroup.class)
    @Size(max = 50, message = "停车场标识长度不能超过{max}位", groups = DefaultGroup.class)
    @JsonProperty("pId")
    private String pId;

    @Override
    public void freeData() {
        this.id = null;
        this.octaneNumber = null;
        this.nozzleNumber = null;
        this.pId = null;
        super.freeData();
    }
}
